<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 64 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts64p0{position:absolute;left:106px;top:97px;}
 .ts64p1{position:absolute;left:352px;top:97px;}
 .ts64p3{position:absolute;left:672px;top:97px;}
 .ts64p7{position:absolute;left:106px;top:113px;}
 .ts64p8{position:absolute;left:706px;top:1026px;}
 .ts64p9{position:absolute;left:331px;top:1044px;}
 .ts64p13{position:absolute;left:106px;top:146px;}
 .ts64p14{position:absolute;left:106px;top:164px;}
 .ts64p16{position:absolute;left:106px;top:183px;}
 .ts64p17{position:absolute;left:106px;top:202px;}
 .ts64p20{position:absolute;left:106px;top:220px;}
 .ts64p21{position:absolute;left:106px;top:238px;}
 .ts64p23{position:absolute;left:106px;top:257px;}
 .ts64p25{position:absolute;left:106px;top:275px;}
 .ts64p27{position:absolute;left:106px;top:293px;}
 .ts64p28{position:absolute;left:106px;top:311px;}
 .ts64p30{position:absolute;left:106px;top:329px;}
 .ts64p32{position:absolute;left:106px;top:347px;}
 .ts64p34{position:absolute;left:106px;top:365px;}
 .ts64p36{position:absolute;left:106px;top:383px;}
 .ts64p38{position:absolute;left:106px;top:402px;}
 .ts64p40{position:absolute;left:106px;top:420px;}
 .ts64p42{position:absolute;left:106px;top:438px;}
 .ts64p44{position:absolute;left:106px;top:456px;}
 .ts64p46{position:absolute;left:106px;top:474px;}
 .ts64p48{position:absolute;left:106px;top:492px;}
 .ts64p50{position:absolute;left:106px;top:510px;}
 .ts64p52{position:absolute;left:106px;top:528px;}
 .ts64p54{position:absolute;left:106px;top:547px;}
 .ts64p56{position:absolute;left:106px;top:565px;}
 .ts64p57{position:absolute;left:106px;top:583px;}
 .ts64p59{position:absolute;left:106px;top:601px;}
 .ts64p61{position:absolute;left:106px;top:619px;}
 .ts64p63{position:absolute;left:106px;top:637px;}
 .ts64p66{position:absolute;left:106px;top:655px;}
 .ts64p68{position:absolute;left:106px;top:673px;}
 .ts64p70{position:absolute;left:106px;top:692px;}
 .ts64p72{position:absolute;left:106px;top:710px;}
 .ts64p73{position:absolute;left:106px;top:728px;}
 .ts64p75{position:absolute;left:106px;top:746px;}
 .ts64p76{position:absolute;left:106px;top:765px;}
 .ts64p77{position:absolute;left:154px;top:765px;}
 .ts64p78{position:absolute;left:106px;top:783px;}
 .ts64p79{position:absolute;left:106px;top:801px;}
 .ts64p82{position:absolute;left:106px;top:820px;}
 .ts64p83{position:absolute;left:106px;top:839px;}
 .ts64p85{position:absolute;left:106px;top:857px;}
 .ts64p86{position:absolute;left:106px;top:876px;}
 .ts64p88{position:absolute;left:106px;top:894px;}
 .ts64p89{position:absolute;left:106px;top:912px;}
 .ts64p91{position:absolute;left:106px;top:930px;}
 .ts64p93{position:absolute;left:106px;top:948px;}
 .ts64p95{position:absolute;left:106px;top:966px;}
 .ts64p97{position:absolute;left:106px;top:984px;}

 /* Font Styles */
 .ft0p64{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p64{font-weight:normal;}
 .ft2p64{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p64{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p64{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p64{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}
 .ft6p64{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}

 /* Background Style */
 .styleBackground64{position:absolute;left:97px;top:200px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index63.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;64 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index65.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground64><img src="./background64.png" width="633" height="855" border="0" alt=""></div>
<div class=ts64p0><span class="ft0p64"> </span></div>
<div class=ts64p1><span class="ft0p64">Gravitybox Schedule Primer<span class="ft1p64"> </span></span></div>
<div class=ts64p3><span class="ft0p64">Page 62&nbsp; </span></div>
<div class=ts64p7><span class="ft2p64"> </span></div>
<div class=ts64p8><span class="ft3p64"> </span></div>
<div class=ts64p9><span class="ft4p64">1998&#45;2004 Gravitybox Software LLC<span class="ft3p64"> </span></span></div>
<div class=ts64p13><span class="ft5p64">upon exit. The deleted array will store the Id of any room that has been removed while </span></div>
<div class=ts64p14><span class="ft5p64">using the screen. </span></div>
<div class=ts64p16><span class="ft5p64"> </span></div>
<div class=ts64p17><span class="ft6p64">Public Sub LoadForm() </span></div>
<div class=ts64p20><span class="ft6p64"> </span></div>
<div class=ts64p21><span class="ft6p64">Dim NewEl As clsItemEl </span></div>
<div class=ts64p23><span class="ft6p64">Dim Db As ADODB.Connection </span></div>
<div class=ts64p25><span class="ft6p64">Dim rs As ADODB.Recordset </span></div>
<div class=ts64p27><span class="ft6p64"> </span></div>
<div class=ts64p28><span class="ft6p64">&nbsp; Set Db = New ADODB.Connection </span></div>
<div class=ts64p30><span class="ft6p64">&nbsp; Db.ConnectionString = GetConnectString &#38; AppPath _ </span></div>
<div class=ts64p32><span class="ft6p64">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#38; &#34;schedule.mdb&#34; </span></div>
<div class=ts64p34><span class="ft6p64">&nbsp; Db.Open </span></div>
<div class=ts64p36><span class="ft6p64">&nbsp; Set rs = New ADODB.Recordset </span></div>
<div class=ts64p38><span class="ft6p64">&nbsp; Set rs = Db.Execute(&#34;select * from [Room] order by </span></div>
<div class=ts64p40><span class="ft6p64">sortorder&#34;) </span></div>
<div class=ts64p42><span class="ft6p64">&nbsp;&nbsp; </span></div>
<div class=ts64p44><span class="ft6p64">&nbsp; Call Rooms.Clear </span></div>
<div class=ts64p46><span class="ft6p64">&nbsp; While Not rs.EOF </span></div>
<div class=ts64p48><span class="ft6p64">&nbsp;&nbsp;&nbsp; Set NewEl = Rooms.Add(rs!Name) </span></div>
<div class=ts64p50><span class="ft6p64">&nbsp;&nbsp;&nbsp; NewEl.Id = rs!RoomId </span></div>
<div class=ts64p52><span class="ft6p64">&nbsp;&nbsp;&nbsp; rs.MoveNext </span></div>
<div class=ts64p54><span class="ft6p64">&nbsp; Wend </span></div>
<div class=ts64p56><span class="ft6p64"> </span></div>
<div class=ts64p57><span class="ft6p64">&nbsp; 'Deallocate objects </span></div>
<div class=ts64p59><span class="ft6p64">&nbsp; Call rs.Close </span></div>
<div class=ts64p61><span class="ft6p64">&nbsp; Call Db.Close </span></div>
<div class=ts64p63><span class="ft6p64">&nbsp; Set rs = Nothing </span></div>
<div class=ts64p66><span class="ft6p64">&nbsp; Set Db = Nothing </span></div>
<div class=ts64p68><span class="ft6p64">&nbsp;&nbsp; </span></div>
<div class=ts64p70><span class="ft6p64">&nbsp; Call Redraw </span></div>
<div class=ts64p72><span class="ft6p64"> </span></div>
<div class=ts64p73><span class="ft6p64">End Sub<span class="ft5p64"> </span></span></div>
<div class=ts64p75><span class="ft5p64"> </span></div>
<div class=ts64p76><span class="ft5p64"> </span></div>
<div class=ts64p77><span class="ft5p64">After the Rooms collection is loaded, we need populate the listbox with the room </span></div>
<div class=ts64p78><span class="ft5p64">names. This is performed in the &#147;Redraw&#148; method. It will clear the listbox and load it with </span></div>
<div class=ts64p79><span class="ft5p64">the contents of the Rooms collection. </span></div>
<div class=ts64p82><span class="ft5p64"> </span></div>
<div class=ts64p83><span class="ft6p64">Private Sub Redraw() </span></div>
<div class=ts64p85><span class="ft6p64"> </span></div>
<div class=ts64p86><span class="ft6p64">'Reloads the combo with the Rooms </span></div>
<div class=ts64p88><span class="ft6p64"> </span></div>
<div class=ts64p89><span class="ft6p64">Dim i As Integer </span></div>
<div class=ts64p91><span class="ft6p64">&nbsp;&nbsp; </span></div>
<div class=ts64p93><span class="ft6p64">&nbsp; Call lstRoom.Clear </span></div>
<div class=ts64p95><span class="ft6p64">&nbsp; For i = 1 To Rooms.Count </span></div>
<div class=ts64p97><span class="ft6p64">&nbsp;&nbsp;&nbsp; Call lstRoom.AddItem(Rooms(i).Name) </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
